from django.urls import path
from. import views

urlpatterns = [
    path('', views.index, name='index'),
    path('register/', views.register, name='register'),
    path('login/', views.user_login, name='login'),
    path('logout/', views.user_logout, name='logout'),
    path('add/', views.add_todo, name='add_todo'),
    path('edit/<int:todo_id>/', views.edit_todo, name='edit_todo'),
    path('toggle/<int:todo_id>/', views.toggle_completed, name='toggle_completed'),
    path('delete/<int:todo_id>/', views.delete_todo, name='delete_todo'),
    path('categories/', views.manage_categories, name='manage_categories'),
    path('category/<int:category_id>/', views.filter_by_category, name='filter_by_category'),
    path('search/', views.search_todos, name='search_todos'),
    path('categories/delete/<int:category_id>/', views.delete_category, name='delete_category'),
    path('report/', views.task_report, name='task_report'),
    path('templates/', views.manage_templates, name='manage_templates'),
    path('templates/delete/<int:template_id>/', views.delete_template, name='delete_template'),
    path('calendar/', views.calendar_view, name='calendar_view'),
    path('api/todos/', views.todo_api, name='todo_api'),
]